package cn.gg.benchmark.util;

public class StringUtil {
	/**
	 * 将字符串装换成整形
	 * 
	 * @param str
	 *            要转换的字符串
	 * @return 字符串表示的整形数
	 */
	public static int Str2Int(String str) {
		if (str == null)
			return -1;
		int integer = 0;
		try {
			integer = Integer.parseInt(str);
		} catch (Exception e) {
			integer = -1;
		}
		return integer;
	}
}
